Skip to main content

Multivariate Calculus

Vector Functions of Several Variables

A vector-valued function of several variables is a function

f:RmRnf: \mathbb{R}^{m} \rightarrow \mathbb{R}^{n}

i.e. a function of mm -dimensional vectors, which returns nn dimensional vectors.

Examples

Example

A real valued function of many variables: f:R3Rf: \mathbb{R}^3\to\mathbb{R}, f(x1,x2,x3)=2x1+3x2+4x3f(x_1,x_2,x_3)=2x_1+3x_2+4x_3.

Note

ff is linear and f(x)=Axf(x)=Ax where

x=(x1x2x3)x = \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix}

and

A=[234]A = \begin{bmatrix} 2 & 3 & 4 \end{bmatrix}
Example

Let

f:R2R2f: \mathbb{R}^{2} \rightarrow \mathbb{R}^{2}

where

f(x1,x2)=(x1+x2x1x2)f(x_1,x_2) = \left( \begin{array}{c} x_1 + x_2 \\ x_1 - x_2 \end{array} \right)
Note

Note that f(x)=Axf(x)=Ax, where

A=[1111]A = \begin{bmatrix} 1 & 1 \\ 1 & -1 \\ \end{bmatrix}
Example

Let

f:R3R4f: \mathbb{R}^{3} \rightarrow \mathbb{R}^{4}

be defined by

f(x)=(x1+x2x1x3yzx1+x2+x3)f(x) = \left( \begin{array}{c} x_1 + x_2 \\ x_1 - x_3 \\ y - z \\ x_1 + x_2 + x_3 \end{array} \right)
Note

f(x)=Axf(x) = Ax

where

A=[110101011111]A = \begin{bmatrix} 1 & 1 & 0 \\ 1 & 0 & -1 \\ 0 & 1 & -1 \\ 1 & 1 & 1 \end{bmatrix}
Example

These multi-dimensional functions do not have to be linear, for example the function f:R2R2f:\mathbb{R}^2\to\mathbb{R}^2

f(x)=(x1x2x12+x22)f(x) = \left( \begin{array}{c} x_1 \cdot x_2 \\ x_1^{2} +x_2^{2} \end{array} \right)

is obviously not linear.

The Gradient

Suppose the real valued function f:RmRf:\mathbb{R}^m \rightarrow \mathbb{R} is differentiable in each coordinate. Then the gradient of ff, denoted f\nabla f is given by

f(x)=(fx1,,fx1)\nabla f(x)=\begin{pmatrix}\displaystyle\frac{\partial f}{\partial x_1},&\dots &,\displaystyle\frac{\partial f}{\partial x_1}\end{pmatrix}

Details

Definition

Suppose the real valued function f:RmRf:\mathbb{R}^m \rightarrow \mathbb{R} is differentiable in each coordinate. Then the gradient of ff, denoted f\nabla f is given by

f(x)=(fx1,,fx1)\nabla f(x)= \begin{pmatrix} \displaystyle\frac{\partial f}{\partial x_1},&\dots &,\displaystyle\frac{\partial f}{\partial x_1}\end{pmatrix}

where each partial derivative fxi\displaystyle\frac{\partial f}{\partial x_i} is computed by differentiating ff with respect to that variable, regarding the others as fixed.

Examples

Example

Let

f(x)=x2+y2+2xyf(\underline{x})= x^2+y^2+2xy

Then the partial derivatives of ff are

fx=2x+2y\displaystyle\frac{\partial f}{\partial x}=2x+2y

and

fy=2y+2x\displaystyle\frac{\partial f}{\partial y}=2y+2x

and the gradient of ff is therefore

f=(2x+2y,2y+2x)\nabla f =\begin{pmatrix}2x+2y, & 2y+2x\end{pmatrix}

Example

Let

f(x)=x1x2f(\underline{x})=x_1-x_2

The gradient of ff is

f=(1,1)\nabla f= \begin{pmatrix}1, & -1\end{pmatrix}

The Jacobian

Now consider a function f:RmRnf:\mathbb{R}^m\to\mathbb{R}^n. Write fif_i for the ithi^{th} coordinate of ff, so we can write f(x)=(f1(x),f2(x),,fn(x))f(x)=(f_1(x),f_2(x),\ldots,f_n(x)), where xRmx\in\mathbb{R}^m. If each coordinate function fif_i is differentiable in each variable we can form the Jacobian matrix of ff:

(f1fn)\begin{pmatrix} \nabla f_1 \\ \vdots \\ \nabla f_n \end{pmatrix}

Details

Now consider a function f:RmRnf:\mathbb{R}^m\to\mathbb{R}^n. Write fif_i for the ithi^{th} coordinate of ff, so we can write f(x)=(f1(x),f2(x),,fn(x))f(x)=(f_1(x),f_2(x),\ldots,f_n(x)), where xRmx\in\mathbb{R}^m. If each coordinate function fif_i is differentiable in each variable we can form the Jacobian matrix of ff:

(f1fn)\begin{pmatrix} \nabla f_1 \\ \vdots \\ \nabla f_n \end{pmatrix}

In this matrix, the element in the ithi^{th} row and jthj^{th} column is fixj\displaystyle\frac{\partial f_i}{\partial x_j}.

Examples

Example

For the function

f(x,y)=(x2+yxyx)=(f1(x,y)f2(x,y)f3(x,y))f(x,y) = \begin{pmatrix} x^2 +y \\ x y \\ x \end{pmatrix} = \begin{pmatrix} f_1(x,y) \\ f_2(x,y) \\ f_3(x,y) \end{pmatrix}

the Jacobian matrix of ff is the matrix

J=[f1f2f3]=[2x2yyx10]J = \begin{bmatrix} \nabla f_1 \\ \nabla f_2 \\ \nabla f_3 \end{bmatrix} = \begin{bmatrix} 2x & 2y \\ y & x \\ 1 & 0 \end{bmatrix}

Univariate Integration By Substitution

If ff is a continuous function and gg is strictly increasing and differentiable then,

g(a)g(b)f(x)dx=abf(g(t))g(t)dt\displaystyle\int_{g(a)}^{g(b)} f(x)dx = \displaystyle\int_a^b f(g(t))g^\prime (t)dt

Details

If ff is a continuous function and gg is strictly increasing and differentiable then,

g(a)g(b)f(x)dx=abf(g(t))g(t)dt\displaystyle\int_{g(a)}^{g(b)} f(x)dx = \displaystyle\int_a^b f(g(t))g^\prime (t)dt

It follows that if XX is a continuous random variable with density ff

and Y=h(X)Y = h(X) is a function of XX that has the inverse g=h1g=h^{-1}, so X=g(Y)X = g(Y), then the density of YY is given by,

fY(y)=f(g(y))g(y)f_Y(y) = f (g(y)) g^\prime (y)

This is a consequence of

P[Yb]=P[g(Y)g(b)]=P[Xg(b)]=g(b)f(x)dx=bf(g(y))g(y)dyP [Y \leq b] = P [g(Y) \leq g(b)] = P [X \leq g(b)] = \displaystyle\int_{- \infty} ^{g(b)}f(x)dx = \displaystyle\int_{- \infty} ^b f (g(y))g^\prime (y)dy

Multivariate Integration By Substitution

Suppose ff is a continuous function f:RnRf: \mathbb{R}^n \rightarrow \mathbb{R} and g:RnRng: \mathbb{R}^n \rightarrow \mathbb{R}^n is a one-to-one function with continuous partial derivatives. Then if URnU \subseteq \mathbb{R}^n is a subset,

g(U)f(x)dx=U(g(y))Jdy\displaystyle\int_{g(U)} f(\mathbf {x})d\mathbf {x} = \displaystyle\int_{U}({g}(\mathbf {y}))|J|d\mathbf {y}

where JJ is the Jacobian matrix and J|J| is the absolute value of it's determinant.

J=[g1y1g1y2g1yngny1gny2gnyn]=[g1gn]J = \left| \begin{bmatrix} \displaystyle\frac{\partial g_1}{\partial y_1} & \displaystyle\frac{\partial g_1}{\partial y_2} & \cdots &\displaystyle\frac{\partial g_1}{\partial y_n} \\ \vdots & \vdots & \cdots & \vdots \\ \displaystyle\frac{\partial g_n}{\partial y_1} & \displaystyle\frac{\partial g_n}{\partial y_2} & \cdots & \displaystyle\frac{\partial g_n}{\partial y_n} \end{bmatrix}\right| = \left|\begin{bmatrix} \nabla g_1 \\ \vdots \\ \nabla g_n \end{bmatrix} \right|

Details

Suppose ff is a continuous function f:RnRf: \mathbb{R}^n \rightarrow \mathbb{R} and g:RnRng: \mathbb{R}^n \rightarrow \mathbb{R}^n is a one-to-one function with continuous partial derivatives. Then if URnU \subseteq \mathbb{R}^n is a subset,

g(U)f(x)dx=U(g(y))Jdy\displaystyle\int_{g(U)} f(\mathbf {x})d\mathbf {x} = \displaystyle\int_{U}({g}(\mathbf {y}))|J|d\mathbf {y}

where JJ is the Jacobian determinant and |J| is its absolute value.

J=[g1y1g1y2g1yngny1gny2gnyn]=[g1gn]J = \left| \begin{bmatrix} \displaystyle\frac{\partial g_1}{\partial y_1} & \displaystyle\frac{\partial g_1}{\partial y_2} & \cdots &\displaystyle\frac{\partial g_1}{\partial y_n} \\ \vdots & \vdots & \cdots & \vdots \\ \displaystyle\frac{\partial g_n}{\partial y_1} & \displaystyle\frac{\partial g_n}{\partial y_2} & \cdots & \displaystyle\frac{\partial g_n}{\partial y_n} \end{bmatrix}\right| = \left|\begin{bmatrix} \nabla g_1 \\ \vdots \\ \nabla g_n \end{bmatrix} \right|

Similar calculations as in 28.4 give us that if XX is a continuous multivariate random variable, X=(X1,,Xn)X = (X_1, \ldots, X_n)^\prime with density ff and Y=h(X)\mathbf{Y} = \mathbf{h} (\mathbf{X}), where h\mathbf{h} is one-to-one with inverse g=h1\mathbf g= \mathbf{h}^{-1}. So, X=g(Y)\mathbf{X} = g(\mathbf{Y}), then the density of Y\mathbf{Y} is given by;

fY(y)=f(g(y))Jf_Y(\mathbf y) = f (g(\mathbf y)) |J|

Examples

Example

If Y=AX\mathbf{Y} = A \mathbf X where AA is an n×nn \times n matrix with det(A)0\det(A)\neq0 and X=(X1,,Xn)X = (X_1, \ldots, X_n)^\prime are independent and identically distributed random variables, then we have the following results.

The joint density of X1XnX_1 \cdots X_n is the product of the individual (marginal) densities,

fX(x)=f(x1)f(x2)f(xn)f_X(\mathbf x)= f(x_1) f(x_2) \cdots f(x_n)

The matrix of partial derivatives corresponds to gy\displaystyle\frac{\partial g}{\partial y} where X=g(Y)\mathbf X = \mathbf g(\mathbf{Y}), i.e. these are the derivatives of the transformation: X=g(Y)=A1Y\mathbf X = g (\mathbf{Y}) = A^{-1}\mathbf{Y}, or X=BY\mathbf X = B \mathbf{Y} where B=A1B = A^{-1}

But if X=BY\mathbf X = B \mathbf{Y}, then

Xi=bi1y1+bi2y2+bijyjbinynX_i = b_{i1}y_1 + b_{i2}y_2 + \cdots b_{ij}y_j\cdots b_{in}y_n

So, xiyj=bij\displaystyle\frac{\partial x_i}{\partial y_j} = b_{ij} and thus,

J=dxdy=B=A1=1AJ =\left|\displaystyle\frac{\partial d\mathbf x}{\partial d\mathbf y}\right| = |B| = |A^{-1}| = \displaystyle\frac {1}{|A|}

The density of Y\mathbf{Y} is therefore;

fY(y)=fX(g(y))J=fX(A1y)A1f_Y(\mathbf{y}) = f_X(g(\mathbf{y})) |J| = f_X(A^{-1}\mathbf{y}) |A^{-1}|